/*
 * $Id: Thread.h,v 1.6 2005-11-20 11:11:31 bacon Exp $
 */

#ifndef _XPO_BAS_THREAD_H_
#define _XPO_BAS_THREAD_H_

#include <xpo/bas/Object.h>
#include <xpo/bas/Runnable.h>
#include <xp/bas/thread.h>
#include <xp/bas/time.h>

@interface XpThread: XpObject<XpRunnable>

{
	xp_thread_t thread;
	/*XpObject<XpRunnable>* thread_target;*/
	id<XpRunnable> thread_target;
}

+ (XpThread*) start: (XpObject<XpRunnable>*) runnable;

- init;

- (int) start;
- (int) start: (XpObject<XpRunnable>*) runnable;

- (int) stop;

- (int) join;
- (void) sleep: (xp_time_t) msecs;

- (int) run;

@end

#endif
